
from rest_framework.generics import ListAPIView
from rest_framework.viewsets import ModelViewSet
from meiduo_admin.paginators import MyPage
from meiduo_admin.serializers.image_serializers import *


# SKU对象序列化
class SKUSimpleListView(ListAPIView):
    queryset = SKU.objects.all()
    serializer_class = SKUSimpleModelSerializer


# SKUImage视图集
class ImageViewSet(ModelViewSet):

    queryset = SKUImage.objects.all()
    serializer_class = ImageModelSerializer
    pagination_class = MyPage